<template>
  <el-card class="calendar-event-card calendar-event-card-view" v-show="visible">
    <div slot="header" class="clearfix">
      <span>{{ model.dispscheduletype }}</span>
    </div>
    <el-row>
      <el-col :span="1">
        <i class="el-icon-c-scale-to-original" title="标题"></i>
      </el-col>
      <el-col :span="23">
        {{ model.name }}
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="1">
        <i class="el-icon-date" title="日期"></i>
      </el-col>
      <el-col :span="23">
        {{ model.begintime }}
        -
        {{ model.endtime }}
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="1">
        <i class="el-icon-collection" title="标签"></i>
      </el-col>
      <el-col :span="23">
        <div class="tag-container">
          <el-tag :key="tag" v-for="tag in tagList" :disable-transitions="false">
            {{ tag }}
          </el-tag>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="1">
        <i class="el-icon-user" title="日程创建人"></i>
      </el-col>
      <el-col :span="23">
        {{ model.handleusername }}
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="1">
        <i class="el-icon-document" title="描述"></i>
      </el-col>
      <el-col :span="23">
        {{ model.content }}
      </el-col>
    </el-row>
  </el-card>
</template>

<script>
/** VUE配置 */
export default {
  components: {},
  data() {
    return {
      model: {},
      visible: false,
      tagList: []
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
      this.tagList = []
      if (this.model.tags !== null && this.model.tags.length > 0) {
        this.tagList = this.model.tags.split(',')
      }
    }
  },
  created() {}
}
</script>
<style scoped lang="scss">
.tag-container {
  .el-tag {
    margin-right: 5px;
    margin-bottom: 5px;
  }
}
.color-block {
  display: inline-block;
  height: 15px;
  width: 15px;
}
.input-with-select {
  .el-select {
    width: 100px;
  }
}
.header-button {
  float: right;
  i {
    cursor: pointer;
    &.el-icon-star-on {
      color: #f56c6c;
    }
  }
}
</style>
<style lang="scss">
.calendar-event-card {
  .el-card__header {
    padding: 10px 10px 6px;
  }
}
.tl-card-form {
  .el-col-1 {
    line-height: 32px;
    height: 32px;
    text-align: center;
  }
}
</style>
